import os
#my files
from download import *
from downloadgroup2 import *
from configuration import *
from processInformation import *
from UpdateManager import *
#--

DO_DOWNLOAD = 0
FILE_TO_DOWNLOAD = 'http://www.meca.ucl.ac.be/commissiondiplome/programme/programme.swf'
FILE_TO_DOWNLOAD2 ='http://www.poetryfoundation.org/foundation/PoetryinAmerican_FullReport.pdf'
FILE_TO_DOWNLOAD3 = 'http://www.educ.umu.se/~cobian/programz/cbSetup.exe'

def main():

	update = UpdateManager()
	update.update()
	
	"""
	download1 = Download(FILE_TO_DOWNLOAD2, 'teste1.pdf')
	download2 = Download(FILE_TO_DOWNLOAD3, 'teste2.exe')
	
	downloads = []
	downloads.append(download1)
	downloads.append(download2)
	
	group = DownloadGroup2(downloads, update)
	
	group.start()
	#group.join()
	
	
	print 'Finished!'
	
	#config = Configuration()
	#print 'Remote version ' + config.get_server_version()
	#print config.get_exefile_address()
	#print config.get_documents_address()
	#print config.get_installed_version()
	
	#print check_process_running('sbarrecadacao')
	#os_killProcName('sbarrecadacao.exe')
	

def update(read, total):
	totalbytes = total
	os.system('cls')
	print 'Downloaded %d from %d' % (read, totalbytes)
"""
	
	
if __name__ == "__main__":
	main()
	
	
